package com.flower8.dao;
import com.flower8.dto.UserCreditPointDto;
import com.flower8.model.UserAppeal;
import com.flower8.model.UserCreditPoint;
import com.flower8.utils.PageData;

import java.util.List;
import java.util.Map;

/**
 * @Description: 信用分Dao接口
 * @Author: tanglin
 * @Date: 2019/12/23 16:04
 * @Version: 1.0
 */
public interface CreditPointDao {
    /**
     * 查询信用分申诉列表
     * @param pd
     * @return
     */
    List<UserCreditPointDto> getAppealList(PageData pd);

    /**
     * 查询信用分申诉列表数量
     * @param pd
     * @return
     */
    int getAppealListCount(PageData pd);

    /**
     * 根据申诉ID查询
     * @param pd
     * @return
     */
    UserAppeal getAppealById (PageData pd);

    /**
     * 更新申诉
     * @param pd
     */
    void updateAppleal(PageData pd);

    /**
     * 查询信用分扣分记录
     * @param crowdfunId
     * @return
     */
    UserCreditPoint getCreditPointByCrowd(long crowdfunId);

    /**
     * 添加一条信用分记录
     * @param param
     * @throws Exception
     */
    void addCreditPoint(Map param) throws Exception;

    /**
     * 更新用户总信用分
     * @param param
     * @throws Exception
     */
    void updateTotalCreditPoint(Map param) throws Exception;
}
